<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
pageContext.setAttribute("basePath",basePath);
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>上传你的头像,展示你的魅力</title>
    <link rel="stylesheet" type="text/css" href="<%=basePath %>resources/bootstrap/css/bootstrap-responsive.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath %>resources/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath %>resources/css/basic.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath %>resources/css/upload_headphoto.css">
	
	<script type="text/javascript" src="${basePath}resources/js/common/base.js"></script>
		<script type="text/javascript" src="${basePath}resources/js/common/jquery-3.2.1.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="uploadHeadphotoController">
    <div id="header">
        <%@ include file="common/header.jsp" %>
        <h2>上传你的头像,展示你的魅力</h2>
    </div>
	<div id="upload">
        <form method="post" action="${basePath}user/back_upload_headphoto"" enctype="multipart/form-data">
            <p>
                <span style="color: red;">只允许上传jpg、JPG、png、PNG文件</span>
                <c:if test="${updErrorInfo != null }">
                	错误信息：<span style="color: red;">${updErrorInfo }</span>
                </c:if>
            </p>
            <p>
                <label class="label label-length" for="image">图片</label>
                <input type="file" name="image" ng-model="image" />
            </p>
            <p>
            	<input type="hidden" name="userId" ng-model="userId" value="{{userId}}" />
            </p>
            <p>
                <input type="submit" class="btn btn-primary" name="uploadBtn" id="uploadBtn" value="上传"  ng-disabled="1==2"/>
            </p>
        </form>
	</div>
    <div id="footer">
        <%@ include file="common/footer.jsp" %>
    </div>

    <script type="text/javascript" src="<%=basePath %>resources/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript" src="<%=basePath %>resources/angular-1.3.0/angular.min.js"></script>
    <script type="text/javascript" src="<%=basePath %>resources/js/upload_headphoto.js"></script>
</body>
</html>